home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc / OpenDoc Development / Debugging Support / OpenDoc Source Code / Storage / TransDlg.r < prev    next >
Encoding:
Text File  |  1996-04-22  |  7.3 KB  |  358 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        TransDlg.r
  3.  
  4.     Contains:    resources for Translation dialog
  5.  
  6.     Owned by:    Craig Carper
  7.  
  8.     Copyright:    © 1993-95 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <9>    10/16/95    CC        GM 1292157: Changed text in Translate to
  13.                                     dialog.
  14.          <8>     9/11/95    CG        #1229981 FB2: Changed to smart quotes in
  15.                                     DITLs.
  16.          <7>      9/7/95    CG        #1229981 FB2:NoPart Alert when no
  17.                                     translators are installed.
  18.          <6>     8/24/95    CC        1279966,1279963: Separate resources for
  19.                                     Part translation dialog.
  20.          <5>     3/28/95    CC        1229640: Added alternate title for
  21.                                     translate dialog.
  22.          <4>     3/27/95    CC        1229640: Added 'finf' resource, changed
  23.                                     dialog text.
  24.          <3>     1/10/95    CG        #1207407: "OK" button is initially in
  25.                                     active.
  26.          <2>    12/13/94    CG        #1187128: Dialog clean up.
  27.          <1>    11/17/94    CG        first checked in
  28.     To Do:
  29. */
  30.  
  31. #define SystemSevenOrBetter 1            // we want the extended types
  32. #define    SystemSevenOrLater    1            // Types.r uses this variable
  33.  
  34. #include "Types.r"
  35. #include "SysTypes.r"
  36.  
  37. #include "TrnDlgDf.h"
  38.  
  39. #define kODTransDataItemRight    316
  40.  
  41. /* Translation Dialog */
  42. resource 'DLOG' (kODTransDlgID, "Translate") {
  43.     {kODTransDialogTop, kODTransDialogLeft, 
  44.         kODTransDialogBottom, kODTransDialogRight},
  45.     dBoxProc,
  46.     invisible,
  47.     noGoAway,
  48.     0x0,
  49.     kODTransDlgID,
  50.     "Part Translation",
  51.     alertPositionParentWindow
  52. };
  53.  
  54. /* Color table for Translation Dialog */
  55. resource 'dctb' (kODTransDlgID, "Translate") {
  56.     0,
  57.     0,
  58.     {
  59.         wContentColor,0xFFFF,0xFFFF,0xFFFF
  60.     }
  61. };
  62.  
  63. /* Item list for Translation dialog */
  64. resource 'DITL' (kODTransDlgID, "Translate") {
  65.     {    /* array DITLarray: 9 elements */
  66.         /* [1] kODTransOKBtn */
  67.         {91, 177, 91+20, 177+59},
  68.         Button {
  69.             enabled,
  70.             "OK"
  71.         },
  72.         /* [2] kODTransCancelBtn */
  73.         {91, 105, 91+20, 105+59},
  74.         Button {
  75.             enabled,
  76.             "Cancel"
  77.         },
  78.         /* [3] kODTransTitle */
  79.         {kItemOnEdgeWhtSp, kItemOnEdgeWhtSp,
  80.             kItemOnEdgeWhtSp+kODTransStaticTxtHeight, 
  81.             kItemOnEdgeWhtSp+200},
  82.         StaticText {
  83.             disabled,
  84.             "Translate to:"
  85.         },
  86.         /* [4] kODTransKindPopup */
  87.         {34, 20, 34+16, 20+200},
  88.         Control {
  89.             enabled,
  90.             kODTransKindCntl
  91.         },
  92.         /* [5] kODTransEditorPopup */
  93.         {55, 20, 55+16, 20+200},
  94.         Control {
  95.             enabled,
  96.             kODTransEditorCntl
  97.         },
  98.         /* [6] kODTransEditorLabel */
  99.         {55, 30, 55+16, 75},
  100.         StaticText {
  101.             disabled,
  102.             "Editor:"
  103.         },
  104.         /* [7] kODTransEditorText */
  105.         {55, 80, 55+16, 20+200},
  106.         StaticText {
  107.             disabled,
  108.             "Unknown"
  109.         },
  110.         /* [8] kODTransNoEditorText */
  111.         {55, 80, 55+16, 20+200},
  112.         StaticText {
  113.             disabled,
  114.             "None for this Kind"
  115.         },
  116.         /* [9] Outline around default button */
  117.         { 91-1-4, 
  118.           177-3-4, 
  119.           91+20-1+4, 
  120.           177+59-3+4
  121.         },
  122.         UserItem {
  123.             disabled
  124.         }
  125.     }
  126. };
  127.  
  128. /* Color table for Translation Dialog items */
  129. data 'ictb' (kODTransDlgID, "Translate") {
  130.     $"0000 0000" /* [1]  */
  131.     $"0000 0000" /* [2]  */
  132.     $"0002 0024" /* [3]  Bold this item */
  133.     $"0000 0000" /* [4]  */
  134.     $"0000 0000" /* [5]  */
  135.     $"0000 0000" /* [6]  */
  136.     $"0000 0000" /* [7]  */
  137.     $"0000 0000" /* [8]  */
  138.     $"0000 0000" /* [9]  */
  139.     /* Text style record */
  140.     $"0000 0100 0000"      /* Bold              */
  141.     $"0000 0000 0000"      /* fore color        */
  142.     $"0000 0000 0000 0000" /* back color + mode */
  143. };
  144.  
  145. /* Window font for Translation dialog */
  146. resource 'finf' (kODTransDlgID, "", purgeable) {
  147.     {
  148.         3,            /* Font Number, 3 = Geneva    */
  149.         plain,        /*         Font Style        */
  150.         10            /*         Font Size        */
  151.     }
  152. };
  153.  
  154. /* Part Translation Dialog */
  155. resource 'DLOG' (kODPartTransDlgID, "Translate") {
  156.     {kODTransDialogTop, kODTransDialogLeft, 
  157.         kODTransDialogBottom, kODTransDialogRight},
  158.     dBoxProc,
  159.     invisible,
  160.     noGoAway,
  161.     0x0,
  162.     kODPartTransDlgID,
  163.     "Part Translation",
  164.     alertPositionParentWindow
  165. };
  166.  
  167. /* Color table for Part Translation Dialog */
  168. resource 'dctb' (kODPartTransDlgID, "Translate") {
  169.     0,
  170.     0,
  171.     {
  172.         wContentColor,0xFFFF,0xFFFF,0xFFFF
  173.     }
  174. };
  175.  
  176. /* Item list for Part Translation dialog */
  177. resource 'DITL' (kODPartTransDlgID, "Translate") {
  178.     {    /* array DITLarray: 9 elements */
  179.         /* [1] kODTransOKBtn */
  180.         {91, 157, 91+20, 157+79},
  181.         Button {
  182.             enabled,
  183.             "Translate"
  184.         },
  185.         /* [2] kODTransCancelBtn */
  186.         {91, 85, 91+20, 85+59},
  187.         Button {
  188.             enabled,
  189.             "Cancel"
  190.         },
  191.         /* [3] kODTransTitle */
  192.         {kItemOnEdgeWhtSp, kItemOnEdgeWhtSp,
  193.             kItemOnEdgeWhtSp+kODTransStaticTxtHeight, 
  194.             kItemOnEdgeWhtSp+200},
  195.         StaticText {
  196.             disabled,
  197.             "Translate this part to:"
  198.         },
  199.         /* [4] kODTransKindPopup */
  200.         {34, 20, 34+16, 20+200},
  201.         Control {
  202.             enabled,
  203.             kODTransKindCntl
  204.         },
  205.         /* [5] kODTransEditorPopup */
  206.         {55, 20, 55+16, 20+200},
  207.         Control {
  208.             enabled,
  209.             kODTransEditorCntl
  210.         },
  211.         /* [6] kODTransEditorLabel */
  212.         {55, 30, 55+16, 75},
  213.         StaticText {
  214.             disabled,
  215.             "Editor:"
  216.         },
  217.         /* [7] kODTransEditorText */
  218.         {55, 80, 55+16, 20+200},
  219.         StaticText {
  220.             disabled,
  221.             "Unknown"
  222.         },
  223.         /* [8] kODTransNoEditorText */
  224.         {55, 80, 55+16, 20+200},
  225.         StaticText {
  226.             disabled,
  227.             "None for this Kind"
  228.         },
  229.         /* [9] Outline around default button */
  230.         { 91-1-4, 
  231.           177-3-4, 
  232.           91+20-1+4, 
  233.           177+59-3+4
  234.         },
  235.         UserItem {
  236.             disabled
  237.         }
  238.     }
  239. };
  240.  
  241. /* Color table for Part Translation Dialog items */
  242. data 'ictb' (kODPartTransDlgID, "Translate") {
  243.     $"0000 0000" /* [1]  */
  244.     $"0000 0000" /* [2]  */
  245.     $"0002 0024" /* [3]  Bold this item */
  246.     $"0000 0000" /* [4]  */
  247.     $"0000 0000" /* [5]  */
  248.     $"0000 0000" /* [6]  */
  249.     $"0000 0000" /* [7]  */
  250.     $"0000 0000" /* [8]  */
  251.     $"0000 0000" /* [9]  */
  252.     /* Text style record */
  253.     $"0000 0100 0000"      /* Bold              */
  254.     $"0000 0000 0000"      /* fore color        */
  255.     $"0000 0000 0000 0000" /* back color + mode */
  256. };
  257.  
  258. /* Window font for Part Translation dialog */
  259. resource 'finf' (kODPartTransDlgID, "", purgeable) {
  260.     {
  261.         3,            /* Font Number, 3 = Geneva    */
  262.         plain,        /*         Font Style        */
  263.         10            /*         Font Size        */
  264.     }
  265. };
  266.  
  267. resource 'CNTL' (kODTransKindCntl, "Kind") {
  268.         {34, 20, 34+16, 20+200},
  269.         popupTitleBold+popupTitleRightJust,
  270.         visible,
  271.         47,                    /* width of title in pixels     */
  272.         kODTransKindMenu,    /* resource id of MENU resource */
  273.         popupMenuCDEFproc+popupUseWFont+popupFixedWidth,
  274.         0,                    /* Refcon */
  275.         "Kind:"
  276. };
  277.  
  278. resource 'CNTL' (kODTransEditorCntl, "Editor") {
  279.         {55, 20, 55+16, 20+200},
  280.         popupTitleBold+popupTitleRightJust,
  281.         visible,
  282.         47,                    /* width of title in pixels     */
  283.         kODTransEditorMenu,    /* resource id of MENU resource */
  284.         popupMenuCDEFproc+popupUseWFont+popupFixedWidth,
  285.         0,                    /* Refcon */
  286.         "Editor:"
  287. };
  288.  
  289. resource 'MENU' (kODTransKindMenu, "Kind") {
  290.     kODTransKindMenu,
  291.     textMenuProc,
  292.     allEnabled,
  293.     enabled,
  294.     "Kind",
  295.     {    /* array: 0 elements */
  296.     }
  297. };
  298.  
  299. resource 'MENU' (kODTransEditorMenu, "Editor") {
  300.     kODTransEditorMenu,
  301.     textMenuProc,
  302.     allEnabled,
  303.     enabled,
  304.     "Editor",
  305.     {    /* array: 0 elements */
  306.     }
  307. };
  308.  
  309.  
  310. resource 'ALRT' (kODNoTransAlert, "No editor/translator") {
  311.     {40, 40, 124, 383},
  312.     kODNoTransAlert,
  313.     {    /* array: 4 elements */
  314.         /* [1] */
  315.         OK, visible, sound1,
  316.         /* [2] */
  317.         OK, visible, sound1,
  318.         /* [3] */
  319.         OK, visible, sound1,
  320.         /* [4] */
  321.         OK, visible, sound1
  322.     }
  323. #if SystemSevenOrLater
  324.     ,
  325.     centerParentWindowScreen
  326. #endif
  327. };
  328.  
  329. resource 'DITL' (kODNoTransAlert, "No editor/translator") {
  330.     {    /* array DITLarray: 4 elements */
  331.         /* [1] */
  332.         {53, 270, 73, 328},
  333.         Button {
  334.             enabled,
  335.             "OK"
  336.         },
  337.         /* [2] */
  338.         {10, 62, 42, 328},
  339.         StaticText {
  340.             disabled,
  341.             "No editors or translators could be found"
  342.             " to open “^0.”"
  343.         },
  344.         /* [3] */
  345.         {10, 20, 42, 52},
  346.         Icon {
  347.             disabled,
  348.             0
  349.         },
  350.         /* [4] */
  351.         {49, 266, 77, 332},
  352.         UserItem {
  353.             disabled
  354.         }
  355.     }
  356. };
  357.  
  358.